#include <iostream>
#include <vector>

using namespace std;

// https://leetcode.cn/problems/container-with-most-water/?envType=study-plan-v2&envId=top-100-liked

class Solution {
public:
    int maxArea(vector<int>& height) {
        int left = 0;
        int right = height.size() - 1;
        int ans = 0;
        while (left < right)
        {
            int curCap = abs(left - right) * min(height[left], height[right]);
            ans = max(ans, curCap);
            height[left] < height[right] ? left++ : right--;
        }
        return ans;
    }
};

int main()
{
    return 0;
}